GtkPopoverMenu: Implement forall
authorMatthias Clasen <mclasen@redhat.com>
Sat, 15 Nov 2014 22:44:39 +0000 (17:44 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 16 Nov 2014 07:30:19 +0000 (02:30 -0500)
This is required to make glade work.

gtk/gtkpopovermenu.c

index 0bd1c0abeee0d4357cf8ffbc0e52b2051c3371c7..fefcdc5e2f845d5db2f6b62e1728e1d39977527c 100644 (file)
@@ -174,6 +174,22 @@ gtk_popover_menu_remove (GtkContainer *container,
     gtk_container_remove (GTK_CONTAINER (stack), child);
 }
 
+static void
+gtk_popover_menu_forall (GtkContainer *container,
+                         gboolean      include_internals,
+                         GtkCallback   callback,
+                         gpointer      callback_data)
+{
+  GtkWidget *stack;
+
+  stack = gtk_bin_get_child (GTK_BIN (container));
+
+  if (include_internals)
+    (* callback) (stack, callback_data);
+
+  gtk_container_forall (GTK_CONTAINER (stack), callback, callback_data);
+}
+
 static void
 gtk_popover_menu_get_child_property (GtkContainer *container,
                                      GtkWidget    *child,
@@ -246,6 +262,7 @@ gtk_popover_menu_class_init (GtkPopoverMenuClass *klass)
 
   container_class->add = gtk_popover_menu_add;
   container_class->remove = gtk_popover_menu_remove;
+  container_class->forall = gtk_popover_menu_forall;
   container_class->set_child_property = gtk_popover_menu_set_child_property;
   container_class->get_child_property = gtk_popover_menu_get_child_property;